fn main() {
    println!("Hello, world!");
    let number = 3;
    if number < 5 {
        println!("true");
    } else {
        println!("false");
    }
    let number = if true { 5 } else { 6 };
    println!("number: {}", number);

    let mut counter = 0;

    let result = loop {
        counter += 1;
        if counter == 10 {
            break counter * 2;
        }
    };

    println!("result: {}", result);

    let mut r = 3;
    while r != 0 {
        println!("r: {}", r);
        r = r - 1;
    }

    let a = [10,20,30,40,50];
    let mut index = 0;

    while index < 5 {
        println!("value: {}", a[index]);
        index += 1;
    }

    for elem in a.iter() {
        println!("value: {}", elem);
    }

    for num in (1..4).rev() {
        println!("{}!", num);
    }

    println!("FINISH!");
}
